package com.coolled.demo03.ctrller;

import com.coolled.demo03.entity.PartMaster;
import com.coolled.demo03.service.PartMasterService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 字典管理
 */
@Slf4j
@RequestMapping("/partMaster")
@RequiredArgsConstructor
@RestController
public class PartMasterCtrller {
    public final PartMasterService partMasterService;

    /**
     * 查询字点
     * @param temp 查询条件实体类
     * @return 查询结果列表
     */
    @GetMapping("getPartMaster")//http://localhost:8844/partMaster/getPartMaster?partIndex=9
    public ResponseEntity<?> getPartMaster(PartMaster temp) {//测试提交//测试修改240604
        List<PartMaster> list=partMasterService.getLikeList(temp);//请养成好习惯，每次提交之前，先同步到最新状态240604A
        return ResponseEntity.ok(list);//最好平常没事就先点下载箭头，开机就先点下载箭头，先同步，后更改240604B
    }


}
